import logging
def log():
    log = logging.basicConfig(level=logging.DEBUG,
                        filemode='w',
                        filename='weidu.log',
                        format="%(levelname)s %(asctime)s %(message)s %(filename)s %(lineno)d")
    return log